Skip to content

Add installed icon-theme picker - #123

Merged
bjarneo merged 3 commits into
omacom:mainfrom
mtolhuys:feature/icon-theme-picker
Sep 15, 2026
Merged

bjarneo merged 3 commits into
omacom:mainfrom
mtolhuys:feature/icon-theme-picker

Conversation

@mtolhuys

@mtolhuys mtolhuys commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What

Add a compact installed icon-theme chooser below Light mode, governed by Aether’s existing Icons target. It is neither a new top-level section nor an individual icon-file picker.

Important

Nearly half of the additions are regression and security tests, and no dependencies were added.

installed-icon-theme-picker

Why

I was about to build a theme creator-ish myself for this. Found out about Aether just in time (thanks for your work here!!) so decided to go for this PR instead.

The Icons target currently always generates Aether's palette-matched Yaru theme. This keeps that default intact while allowing an installed desktop icon theme to travel with the rest of an Aether/Omarchy theme.

Behavior

  • Automatic preserves Aether’s existing palette-matched Yaru output exactly.
  • Explicit writes the validated installed theme ID plus one newline.
  • Disabling Icons omits icons.theme without erasing the selection.
  • Missing or uninstalled selections remain visible and preserved instead of being silently replaced.

Review map

  • internal/icontheme/ — bounded XDG discovery, metadata parsing, containment checks, and rasterized previews.
  • internal/theme/, internal/blueprint/, and cli/ — state, serialization, validation, and output behavior.
  • frontend/src/ — chooser UI plus dirty-state and undo/redo integration.
  • frontend/wailsjs/ — generated Wails contracts.
  • Test files — backward compatibility, malformed input, traversal, symlink, preview, and serialization coverage.

The selection participates in editor state, dirty tracking, undo/redo, blueprints, import/export, CLI generation, and Omarchy-v4 output.

Safety

Discovery is read-only and bounded across standard XDG icon roots, with user-before-system precedence and symlink-containment checks. The WebView receives only metadata and backend-rasterized PNG previews—never arbitrary host paths or raw SVG/XPM.

Verification

Go tests (including race and Go 1.23.12), vet, Svelte checks, frontend regression tests, production builds, generated Wails bindings, and git diff --check pass. The complete interaction was also exercised in a disposable Omarchy-v4 desktop: enable Icons → choose Lab Blue → Apply Theme → Save and Apply. The generated and active icons.theme both contained exactly Lab-Blue\n.

@mtolhuys

Copy link
Copy Markdown
Contributor Author

Turns out “I would like to pick an icon theme” has a few more tentacles than the button suggests 😅

Kept it as one PR because the feature crosses discovery, editor state, serialization, generation, CLI, and UI. Splitting those paths would leave some awkward half-working pieces. Nearly half of the additions are focused regression and security tests, with no new dependencies.

Just say the word and I'll be happy to sharpen any rough edges that turn up during review!

@bjarneo

bjarneo commented Sep 15, 2026

Copy link
Copy Markdown
Member

The integration now uses the current native bundle writer and preserves Omarchy color values. Icon selection follows undo, blueprints, imports, captured requests, and CLI paths. System-theme imports also restore icons.theme. The chooser uses standard button semantics, and automatic icons remain the default. Verification passes: 93 frontend tests, Svelte checks, the frontend build, the full native Go race suite, Go vet, and both CodeQL jobs.

@bjarneo
bjarneo merged commit 6b0bb44 into omacom:main Sep 15, 2026
3 checks passed
@mtolhuys

Copy link
Copy Markdown
Contributor Author

Cool! Thanks for the integration work, Bjarne. Nice to see it land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants